﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DACK_N28_QLRCP
{
    public partial class FrmQLPhim : Form
    {
        public FrmQLPhim()
        {
            InitializeComponent();
        }

      
        private void FrmQLPhim_Load(object sender, EventArgs e)
        {
            string sql = string.Format("SELECT TOP 1000 MaPhim, TenPhim FROM [Phim]");
            Sql_Dataprovider.Sql_DataProvider LoadP = new Sql_Dataprovider.Sql_DataProvider();
            QuanLyPhim.dgvDSPhim.DataSource = LoadP.SQL_ExecuteTable(sql);

            LoadP.Connect.Open();
            QuanLyPhim.cmbDinhDang.DataSource = LoadP.SQL_ExecuteTable("select * from DinhDang");
            QuanLyPhim.cmbDinhDang.DisplayMember = "DinhDang";
            QuanLyPhim.cmbDinhDang.ValueMember = "MaDinhDang";


            QuanLyPhim.cmbDoiTuongCam.DataSource = LoadP.SQL_ExecuteTable("select * from DoiTuong");
            QuanLyPhim.cmbDoiTuongCam.DisplayMember = "DoiTuong";
            QuanLyPhim.cmbDoiTuongCam.ValueMember = "MaDoiTuong";



        }

    }
}
